package com.fowo.api.service.handleWork;

import com.fowo.api.entity.FundsPayOrder;
import com.fowo.api.mapper.FundsPayOrderMapper;
import com.fowo.api.model.funds.pay.order.FundsPayOrderInvalidateAction;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class FundsPayOrderInvalidate implements FundsPayOrderInvalidateAction {
    @Resource
    private FundsPayOrderMapper fundsPayOrderMapper;

    @Override
    public void run(Long id) throws Exception {
        FundsPayOrder fundsPayOrder = fundsPayOrderMapper.selectById(id);
        fundsPayOrder.setStatus("QK05");
        fundsPayOrderMapper.updateById(fundsPayOrder);
    }
}
